package com.example.cassandra_demo.configuration;

import com.example.cassandra_demo.repository.HotelByLetterRepository;
import com.example.cassandra_demo.repository.HotelRepository;
import com.example.cassandra_demo.service.HotelService;
import com.example.cassandra_demo.service.impl.HotelServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: Crystal
 * @Date: 2019/1/22 11:53
 **/
@Configuration
public class RootConfiguration {

    @Bean
    public HotelService hotelService(HotelRepository hotelRepository,
                                     HotelByLetterRepository hotelByLetterRepository) {
        return new HotelServiceImpl(hotelRepository, hotelByLetterRepository);
    }


}
